package com.atguigu.guli.service.edu.feign.fallback;

import com.atguigu.guli.service.base.result.R;
import com.atguigu.guli.service.base.result.ResultCodeEnum;
import com.atguigu.guli.service.edu.feign.OssClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class OssClientFallback implements OssClient {
    @Override
    public R test(String username, String password) {
        return R.setResult(ResultCodeEnum.UNKNOWN_REASON);
    }

    @Override
    public R test2(R r) {
        return R.setResult(ResultCodeEnum.UNKNOWN_REASON);
    }

    @Override
    public R delete(String path, String module) {
        log.error("远程访问oss删除文件失败：{},{}",path,module);
        return R.setResult(ResultCodeEnum.FILE_DELETE_ERROR);
    }
}
